More rebasing

This commit is contained in:
lifehackerhansol 2021-10-19 10:28:01 -07:00 committed by lifehackerhansol
parent 22cb19a0bc
commit 8bbbecf32a
20 changed files with 8897 additions and 25 deletions

View File

@ -174,6 +174,7 @@ exclude:
- gulpfile.js
- LICENSE
- log
- minimal-mistakes-jekyll.gemspec
- node_modules
- package.json
- package-lock.json
@ -182,6 +183,7 @@ exclude:
- tmp
- _pages/af_ZA,
- _pages/ar_SA,
- _pages/bg_BG,
- _pages/ca_ES,
- _pages/cs_CZ,
- _pages/da_DK,
@ -189,11 +191,13 @@ exclude:
- _pages/el_GR,
- _pages/en_PT,
# _pages/en_US,
- _pages/es_EM,
- _pages/et_EE,
- _pages/ca_ES,
# - _pages/es_ES,
# - _pages/fi_FI,
# - _pages/fr_FR,
# - _pages/he_IL,
- _pages/hr_HR,
# - _pages/hu_HU,
- _pages/id_ID,
# - _pages/it_IT,

View File

@ -11,8 +11,12 @@
{% endif %}
{% endfor %}
{% endif %}
<!--
{% unless site.atom_feed.hide %}
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
{% endunless %}
</ul>
-->
</div>
<div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}</div>
<div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}.<!-- {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.--></div>

View File

@ -7,7 +7,13 @@
{% unless logo_path == empty %}
<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt="{{ site.masthead_title | default: site.title }}"></a>
{% endunless %}
<!-- <a class="site-title" href="{{ '/' | relative_url }}">
{{ site.masthead_title | default: site.title }}
{% if site.subtitle %}<span class="site-subtitle">{{ site.subtitle }}</span>{% endif %}
</a>
-->
<ul class="visible-links">
<!-- modified to use multilang, guide-specific -->
{% assign split_path = page.path | split: "/" %}
{% assign locale = split_path[1] %}
{% assign titles = site.data.navigation[locale].main %}
@ -24,6 +30,7 @@
<li class="masthead__menu-item"><a href="{{ domain }}{{ locale_var }}{{ link.url }}">{{ link.title }}</a></li>
{% endif %}
{% endfor %}
<!-- end guide specific -->
</ul>
{% if site.search == true %}
<button class="search__toggle" type="button">
@ -31,6 +38,7 @@
<i class="fas fa-search"></i>
</button>
{% endif %}
<!-- completely redo hidden links for multilang, guide-specific -->
<ul class="hidden-links links-menu hidden"></ul>
<ul class="hidden-links lang-menu hidden">
{% assign split_url = page.url | split: "/" %}

View File

@ -454,11 +454,11 @@
.nav__list .nav__items {
margin: 0;
font-size: 1.4rem;
font-size: 1.25rem;
a {
color: inherit;
line-height: 1.6;
// line-height: 1.6;
}
// progress list, guide-specific

View File

@ -17,6 +17,7 @@
font-family: $global-font-family;
font-size: $type-size-6 !important;
text-indent: initial; /* override*/
font-weight: bold; // guide specific
background-color: mix($background-color, $notice-color, $notice-background-mix);
border-radius: $border-radius;
box-shadow: 0 1px 1px rgba($notice-color, 0.25);

View File

@ -1,22 +1,279 @@
/* ==========================================================================
Nord skin
========================================================================== */
// Project: Nord
// Version: 0.2.0
// Repository: https://github.com/arcticicestudio/nord
/*
MIT License (MIT)
Copyright (c) 2016-2021 Arctic Ice Studio development@arcticicestudio.com (https://www.arcticicestudio.com)
Copyright (c) 2016-2021 Sven Greb development@svengreb.de (https://www.svengreb.de)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
////
/// An arctic, north-bluish color palette.
/// Created for the clean- and minimal flat design pattern to achieve a optimal focus and readability for code syntax
/// highlighting and UI.
/// It consists of a total of sixteen, carefully selected, dimmed pastel colors for a eye-comfortable, but yet colorful
/// ambiance.
///
/// @author Arctic Ice Studio <development@arcticicestudio.com>
////
/// Base component color of "Polar Night".
///
/// Used for texts, backgrounds, carets and structuring characters like curly- and square brackets.
///
/// @access public
/// @example scss - SCSS
/// /* For dark ambiance themes */
/// .background {
/// background-color: $nord0;
/// }
/// /* For light ambiance themes */
/// .text {
/// color: $nord0;
/// }
/// @group polarnight
/// @since 0.1.0
$nord0: #2e3440;
/// Lighter shade color of the base component color.
///
/// Used as a lighter background color for UI elements like status bars.
///
/// @access public
/// @group polarnight
/// @see $nord0
/// @since 0.1.0
$nord1: #3b4252;
/// Lighter shade color of the base component color.
///
/// Used as line highlighting in the editor.
/// In the UI scope it may be used as selection- and highlight color.
///
/// @access public
/// @example scss - SCSS
/// /* Code Syntax Highlighting scope */
/// .editor {
/// &.line {
/// background-color: $nord2;
/// }
/// }
///
/// /* UI scope */
/// button {
/// &:selected {
/// background-color: $nord2;
/// }
/// }
/// @group polarnight
/// @see $nord0
/// @since 0.1.0
$nord2: #434c5e;
/// Lighter shade color of the base component color.
///
/// Used for comments, invisibles, indent- and wrap guide marker.
/// In the UI scope used as pseudoclass color for disabled elements.
///
/// @access public
/// @example scss - SCSS
/// /* Code Syntax Highlighting scope */
/// .editor {
/// &.indent-guide,
/// &.wrap-guide {
/// &.marker {
/// color: $nord3;
/// }
/// }
/// }
/// .comment,
/// .invisible {
/// color: $nord3;
/// }
///
/// /* UI scope */
/// button {
/// &:disabled {
/// background-color: $nord3;
/// }
/// }
/// @group polarnight
/// @see $nord0
/// @since 0.1.0
$nord3: #4c566a;
/// Base component color of "Snow Storm".
///
/// Main color for text, variables, constants and attributes.
/// In the UI scope used as semi-light background depending on the theme shading design.
///
/// @access public
/// @example scss - SCSS
/// /* For light ambiance themes */
/// .background {
/// background-color: $nord4;
/// }
/// /* For dark ambiance themes */
/// .text {
/// color: $nord4;
/// }
/// @group snowstorm
/// @since 0.1.0
$nord4: #d8dee9;
/// Lighter shade color of the base component color.
///
/// Used as a lighter background color for UI elements like status bars.
/// Used as semi-light background depending on the theme shading design.
///
/// @access public
/// @group snowstorm
/// @see $nord4
/// @since 0.1.0
$nord5: #e5e9f0;
/// Lighter shade color of the base component color.
///
/// Used for punctuations, carets and structuring characters like curly- and square brackets.
/// In the UI scope used as background, selection- and highlight color depending on the theme shading design.
///
/// @access public
/// @group snowstorm
/// @see $nord4
/// @since 0.1.0
$nord6: #eceff4;
/// Bluish core color.
///
/// Used for classes, types and documentation tags.
///
/// @access public
/// @group frost
/// @since 0.1.0
$nord7: #8fbcbb;
/// Bluish core accent color.
///
/// Represents the accent color of the color palette.
/// Main color for primary UI elements and methods/functions.
///
/// Can be used for
/// - Markup quotes
/// - Markup link URLs
///
/// @access public
/// @group frost
/// @since 0.1.0
$nord8: #88c0d0;
/// Bluish core color.
///
/// Used for language-specific syntactic/reserved support characters and keywords, operators, tags, units and
/// punctuations like (semi)colons,commas and braces.
///
/// @access public
/// @group frost
/// @since 0.1.0
$nord9: #81a1c1;
/// Bluish core color.
///
/// Used for markup doctypes, import/include/require statements, pre-processor statements and at-rules (`@`).
///
/// @access public
/// @group frost
/// @since 0.1.0
$nord10: #5e81ac;
/// Colorful component color.
///
/// Used for errors, git/diff deletion and linter marker.
///
/// @access public
/// @group aurora
/// @since 0.1.0
$nord11: #bf616a;
/// Colorful component color.
///
/// Used for annotations.
///
/// @access public
/// @group aurora
/// @since 0.1.0
$nord12: #d08770;
/// Colorful component color.
///
/// Used for escape characters, regular expressions and markup entities.
/// In the UI scope used for warnings and git/diff renamings.
///
/// @access public
/// @group aurora
/// @since 0.1.0
$nord13: #ebcb8b;
/// Colorful component color.
///
/// Main color for strings and attribute values.
/// In the UI scope used for git/diff additions and success visualizations.
///
/// @access public
/// @group aurora
/// @since 0.1.0
$nord14: #a3be8c;
/// Colorful component color.
///
/// Used for numbers.
///
/// @access public
/// @group aurora
/// @since 0.1.0
$nord15: #b48ead;
// adapt to Minimal Mistakes
/* Colors */
$background-color: #2E3440 !default;
$text-color: #D8DEE9 !default;
$primary-color: #88C0D0 !default;
$border-color: mix(#fff, $background-color, 20%) !default;
$code-background-color: mix(#000, $background-color, 15%) !default;
$code-background-color-dark: mix(#000, $background-color, 20%) !default;
$form-background-color: mix(#000, $background-color, 15%) !default;
$footer-background-color: mix(#000, $background-color, 30%) !default;
$link-color: mix($primary-color, $text-color, 40%) !default;
$link-color-hover: mix(#fff, $link-color, 25%) !default;
$link-color-visited: mix(#000, $link-color, 25%) !default;
$masthead-link-color: $text-color !default;
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
$background-color : $nord0 !default;
$text-color : $nord4 !default;
$primary-color : $nord8 !default;
$success-color : $nord14 !default;
$warning-color : $nord12 !default;
$danger-color : $nord11 !default;
$info-color : $nord10 !default;
$border-color : mix(#fff, $background-color, 20%) !default;
$code-background-color : mix(#000, $background-color, 15%) !default;
$code-background-color-dark : mix(#000, $background-color, 20%) !default;
$form-background-color : mix(#000, $background-color, 15%) !default;
$footer-background-color : mix(#000, $background-color, 30%) !default;
$link-color : mix($primary-color, $text-color, 40%) !default;
$link-color-hover : mix(#fff, $link-color, 25%) !default;
$link-color-visited : mix(#000, $link-color, 25%) !default;
$masthead-link-color : $text-color !default;
$masthead-link-color-hover : mix(#000, $text-color, 20%) !default;
$navicon-link-color-hover : mix(#000, $background-color, 30%) !default;
$notice-background-mix : 45% !default;
.author__urls.social-icons .fa,
.page__footer-follow .social-icons .fa {

5
crowdin.yaml Normal file
View File

@ -0,0 +1,5 @@
files:
- source: /_pages/en_US/*.txt
translation: /_pages/%locale_with_underscore%/%original_file_name%
- source: /_data/navigation/en_US.yml
translation: /_data/navigation/%locale_with_underscore%.yml

View File

@ -0,0 +1,61 @@
# last changed: 20171107
# author: Some1CP
set SUCCESSMSG "Cleanup completed successfully"
set ERRORMSG "Cleanup failed"
ask "This will clean the final setup files from your SD.\n\nContinue?"
#allow SD modifications
allow -a 0:/
# remove existing files
#2xrsa
rm -o -s 0:/arm9.bin
rm -o -s 0:/arm11.bin
#Cubic Ninja
rm -o -s 0:/ntr.bin
#Soundhax
rm -o -s 0:/soundhax-usa-o3ds.m4a
rm -o -s 0:/soundhax-usa-n3ds.m4a
rm -o -s 0:/soundhax-eur-o3ds.m4a
rm -o -s 0:/soundhax-eur-n3ds.m4a
rm -o -s 0:/soundhax-jpn-o3ds.m4a
rm -o -s 0:/soundhax-jpn-n3ds.m4a
rm -o -s 0:/soundhax-kor-o3ds.m4a
rm -o -s 0:/soundhax-kor-n3ds.m4a
rm -o -s 0:/otherapp.bin
rm -o -s 0:/3ds/safehax.3dsx
rm -o -s 0:/3ds/udsploit.3dsx
rm -o -s 0:/safehaxpayload.bin
#mset
rm -o -s 0:/Launcher.dat
rm -o -s 0:/SafeB9SInstaller.dat
#DSiWareHax
rm -o -s 0:/public.sav
rm -o -s 0:/boot.nds
rm -o -s 0:/savedata
rm -o -s 0:/sudoku_v0.app
rm -o -s 0:/4swords.app
#ntrboot_flasher
rm -o -s 0:/luma/payloads/ntrboot_flasher.firm
rm -o -s 0:/ntrboot
rm -o -s 0:/ntrboot.firm
#Common files
rm -o -s 0:/boot9strap
rm -o -s 0:/cias
rm -o -s 0:/gm9/scripts/setup_ctrnand_luma3ds.gm9
rm -o -s 0:/gm9/scripts/cleanup_sd_card.gm9
#A9LH files
rm -o -s 0:/arm9loaderhax.bin
rm -o -s 0:/files9/aeskeydb.bin
set ERRORMSG "Cleanup completed successfully"

View File

@ -0,0 +1,24 @@
# CTRTransfer Ticket Copy script
# last changed: 20170716
# author: Plailect
set SUCCESSMSG "Copied tickets successfully"
ask "This will copy CTRTransfer tickets,\nallowing for your games to work correctly.\n\nContinue?"
allow 1:/
# Mount ticket image backup
set ERRORMSG "Could not find ticket backup.\nSomething has gone wrong with your CTRTransfer."
imgmount 1:/dbs/ticket.bak
# Check for "eshop" or "unknown" tickets, ignore "system" tickets (because "system" has no "o" in it)
# AFAIK there's no better way to do this because I can't do && in a "find" command
set ERRORMSG "No user tickets found.\nSkip the 'Reinstalling Tickets' section."
find T:/*o* NULL
set ERRORMSG ""
rm -o -s $[GM9OUT]/ctrtransfer_tickets
mkdir $[GM9OUT]/ctrtransfer_tickets
cp -o -s T:/eshop $[GM9OUT]/ctrtransfer_tickets/eshop
cp -o -s T:/unknown $[GM9OUT]/ctrtransfer_tickets/unknown

View File

@ -0,0 +1,23 @@
# last changed: 20171118
# author: figgyc
set ERRORMSG "HOME Menu extdata removal failed"
set SUCCESSMSG "HOME Menu extdata removal success"
ask "This will remove the HOME Menu extdata from your SD.\n\nContinue?"
# allow "SYSNAND SD" (Nintendo 3DS folder) modifications
allow -a A:/
# EUR
rm -o -s A:/extdata/00000000/00000098
# JPN
rm -o -s A:/extdata/00000000/00000082
# USA
rm -o -s A:/extdata/00000000/0000008f
# CHN
rm -o -s A:/extdata/00000000/000000A1
# KOR
rm -o -s A:/extdata/00000000/000000A9
# TWN
rm -o -s A:/extdata/00000000/000000B1

View File

@ -0,0 +1,12 @@
# last changed: 20171118
# author: figgyc
ask "This will remove the NNID from your device.\n\nContinue?"
set ERRORMSG "NNID removal failed"
set SUCCESSMSG "NNID removal success"
# allow NAND modifications
allow -a 1:/
mv -w 1:/data/$[SYSID0]/sysdata/00010038/00000000 1:/data/$[SYSID0]/sysdata/00010038/10000000

View File

@ -0,0 +1,19 @@
# SafeB9SInstaller reverter script (restores the backed up data)
# Not recommended on custom NCSDs(!)
# last changed: 20170706
# author: d0k3
set SUCCESSMSG "SB9SI reverted successfully"
# check for boot9strap firm backup
set ERRORMSG "SB9SI FIRM backup not found"
find 0:/boot9strap/firm0_enc.bak NULL
find 0:/boot9strap/firm1_enc.bak NULL
# inject the backups @ the correct locations
set ERRORMSG "SB9SI not reverted.\nNo changes written to the system."
ask "!!WARNING!!\nThis will restore the backups\nfound in 0:/boot9strap.\n \nProceed?"
allow S:/nand.bin
inject -n -s -o 0:/boot9strap/sector0x96_enc.bak S:/nand.bin@12C00
inject -n 0:/boot9strap/firm0_enc.bak S:/nand.bin@B130000
inject -n 0:/boot9strap/firm1_enc.bak S:/nand.bin@B530000

View File

@ -0,0 +1,17 @@
# SafeB9SInstaller reverter script (restores the backed up data)
# Not recommended on custom NCSDs(!)
# last changed: 20170706
# author: d0k3
set SUCCESSMSG "SB9SI reverted successfully"
# check for boot9strap firm backup
set ERRORMSG "SB9SI (pre0.0.7) FIRM backup not found"
find 0:/boot9strap/firm0firm1.bak NULL
# inject the backups @ the correct locations
set ERRORMSG "SB9SI not reverted.\nNo changes written to the system."
ask "!!WARNING!!\nThis will restore the backups\nfound in 0:/boot9strap/.\n \nProceed?"
allow S:/nand.bin
inject -n -s -o 0:/boot9strap/sector0x96.bak S:/nand.bin@12C00
inject -n 0:/boot9strap/firm0firm1.bak S:/nand.bin@B130000

View File

@ -0,0 +1,10 @@
ask "!!! CAREFUL !!!\nThis script will temporarily boot the\nconsole STOCK to check if it will work\nproperly after CFW is uninstalled.\n \nYou should only be using this script\nwhile following the instructions on\n3ds.hacks.guide/uninstall-cfw.\n \nThe console will remain in 'stock mode'\nuntil it is rebooted. Note that entering\nand exiting DS mode or System Settings\nwill reboot the console.\n \nUpdating from this environment may\nlead to UNINTENDED CONSEQUENCES!\n \nContinue?"
if chk $[ONTYPE] "N3DS"
set D 2
else
set D 0
end
find 1:/title/00040138/$[D]0000002/content/????????.app A
imgmount $[A]
verify G:/exefs/.firm
boot G:/exefs/.firm

View File

@ -0,0 +1,19 @@
# Luma3DS CTRNAND Setup script
# last changed: 20170716
# author: ihaveamac
set SUCCESSMSG "Luma3DS copied successfully"
ask "This will copy Luma3DS to your CTRNAND,\nallowing for the system to work without\nan SD card.\n\nContinue?"
allow 1:/
# remove existing files just in case
rm -o -s 1:/boot.firm
rm -o -s 1:/rw/luma
# copy specific files over
cp 0:/boot.firm 1:/boot.firm
mkdir 1:/rw/luma
cp 0:/luma/payloads 1:/rw/luma/payloads
cp 0:/luma/config.bin 1:/rw/luma/config.bin

View File

@ -0,0 +1,30 @@
# SigHax Uninstaller script (reverts from SigHax to stock)
# This is for retail N3DS units only
# Not recommended on custom NCSDs(!)
# last changed: 20170716
# author: d0k3
set SUCCESSMSG "CFW uninstalled successfully"
# check sector 0x96
set ERRORMSG "Sector 0x96 is not genuine.\nCan't continue."
sha S:/sector0x96.bin 82F2730D2C2DA3F30165F987FDCCAC5CBAB24B4E5F65C981CD7BE6F438E6D9D3
# grab NATIVE_FIRM out of the NCCH
set ERRORMSG "NATIVE_FIRM not found.\nIs this a N3DS?"
find -f 1:/title/00040138/20000002/content/????????.app NATIVE_NCCH
imgmount $[NATIVE_NCCH]
verify G:/exefs/.firm
set NATIVE_FIRM $[GM9OUT]/NATIVE_FIRM.firm
cp -w G:/exefs/.firm $[NATIVE_FIRM]
imgumount
# Write NATIVE_FIRM to the FIRM partitions
set ERRORMSG "Sighax not uninstalled.\nNo changes written to the system."
ask "!!WARNING!!\nThis will remove sighax and\nrevert your system to stock.\n \nProceed?"
allow S:/firm0.bin # same permission level for all firms
allow 1:/ # for ctrnand file removal
rm -o -s 1:/boot.firm
rm -o -s 1:/rw/luma
cp -n $[NATIVE_FIRM] S:/firm0.bin
cp -n $[NATIVE_FIRM] S:/firm1.bin

View File

@ -0,0 +1,26 @@
# SigHax Uninstaller script (reverts from SigHax to stock)
# This is for retail O3DS units only
# Not recommended on custom NCSDs(!)
# last changed: 20170716
# author: d0k3
set SUCCESSMSG "CFW uninstalled successfully"
# grab NATIVE_FIRM out of the NCCH
set ERRORMSG "NATIVE_FIRM not found.\nIs this a O3DS?"
find -f 1:/title/00040138/00000002/content/????????.app NATIVE_NCCH
imgmount $[NATIVE_NCCH]
verify G:/exefs/.firm
set NATIVE_FIRM $[GM9OUT]/NATIVE_FIRM.firm
cp -w G:/exefs/.firm $[NATIVE_FIRM]
imgumount
# Write NATIVE_FIRM to the FIRM partitions
set ERRORMSG "Sighax not uninstalled.\nNo changes written to the system."
ask "!!WARNING!!\nThis will remove sighax and\nrevert your system to stock.\n \nProceed?"
allow S:/nand.bin # same permission level for all firms
allow 1:/ # for ctrnand file removal
rm -o -s 1:/boot.firm
rm -o -s 1:/rw/luma
cp -n $[NATIVE_FIRM] S:/firm0.bin
cp -n $[NATIVE_FIRM] S:/firm1.bin

70
rss.py Normal file
View File

@ -0,0 +1,70 @@
#!/usr/bin/env python3
"""Python Script for generating an rss.xml for the Guide. Requires bencodepy from pypy."""
import os
import hashlib
import urllib.parse
import datetime
import bencodepy
dir = os.path.join(os.getcwd(), "torrents")
rss = os.path.join(os.getcwd(), "rss.xml")
with open(rss, "w") as xml:
xml.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
xml.write("<rss version=\"2.0\">\n")
xml.write("\t<channel>\n")
xml.write("\t\t<title>Plailect Guide Feed</title>\n")
xml.write("\t\t<lastBuildDate>{0}</lastBuildDate>\n".format(datetime.datetime.utcnow().strftime("%a, %d %b %Y %X +0000")))
xml.write("\t\t<link>https://github.com/Plailect/Guide_3DS/</link>\n")
for filename in os.listdir(dir):
if filename.endswith(".torrent"):
filepath = os.path.join(dir, filename)
with open(filepath, "rb") as a:
raw = a.read()
tor = bencodepy.decode(raw)
trackers = []
infohash = hashlib.sha1(bencodepy.encode(tor[b"info"])).hexdigest().upper()
magp = {"xt": "urn:btih:{0}".format(infohash), "dn": tor[b"info"][b"name"], "xl": tor[b"info"][b"length"]}
magstr = urllib.parse.urlencode(magp)
for anncl in tor[b"announce-list"]:
if isinstance(anncl, list):
for annc in anncl:
trackers.append(annc.decode("utf-8"))
else:
trackers.append(anncl.decode("utf-8"))
length = tor[b"info"][b"length"]
name = tor[b"info"][b"name"].decode("utf-8")
ts = tor[b"creation date"]
pubdate = datetime.datetime.utcfromtimestamp(int(ts))
xml.write("\t\t<item>\n")
xml.write("\t\t\t<title>{0}</title>\n".format(name))
xml.write("\t\t\t<description>{0}</description>\n".format(name))
xml.write("\t\t\t<guid>{0}</guid>\n".format(infohash))
xml.write("\t\t\t<link>magnet:?xt=urn:btih:{0}</link>\n".format(infohash))
xml.write("\t\t\t<pubDate>{0}</pubDate>\n".format(pubdate.strftime("%a, %d %b %Y %X +0000")))
xml.write("\t\t\t<contentLength>{0}</contentLength>\n".format(length))
xml.write("\t\t\t<infoHash>{0}</infoHash>\n".format(infohash))
xml.write("\t\t\t<magnetURI>magnet:?xt=urn:btih:{0}</magnetURI>\n".format(infohash))
#xml.write("\t\t\t<fileName>{0}</fileName><fileName>\n".format(name))
xml.write("\t\t\t<enclosure url=\"magnet:?xt=urn:btih:{0}\" type=\"application/x-bittorrent\" />\n".format(infohash))
if trackers:
xml.write("\t\t\t<trackers>\n")
xml.write("\t\t\t\t<group order=\"random\">\n")
for tracker in trackers:
xml.write("\t\t\t\t\t<tracker>\n")
xml.write("\t\t\t\t\t\t{0}\n".format(tracker))
xml.write("\t\t\t\t\t</tracker>\n")
xml.write("\t\t\t\t</group>\n")
xml.write("\t\t\t</trackers>\n")
xml.write("\t\t</item>\n")
xml.write("\t</channel>\n")
xml.write("</rss>")

8282
rss.xml Normal file

File diff suppressed because it is too large Load Diff