Making your own chanfiles
So you've come across an awesome site, but noone's made a chanfile yet? Fear not; making your own chanfiles is easier than it might seem. Here's a complete guide on how to do just that.
Basics
Chanfiles are built up somewhat like a speadsheet, with tables consisting of rows and columns. The rows are the boards on the chan, while the columns are related information for each board. Each row is separated by one new line, while each column is separated by one or more hits of the Tab key.
Not all rows are read by Chanmongler though; table headers are there to remind you what goes where, while blanklines are a feeble attempt at making things more lucid. Even though their content are not important, the lines themselves are. Do not skip them!
Row (line) 1
Row one is a table header, thus it serves no purpose.
Row (line) 2
Row two contains general information about the chan.
Row 2 - Column 1 - Chan subfolder
What Chanmongler will call the chan's subfolder, if it's asked to create one.
Row 2 - Column 2 - Chan name
The name of the chan, displayed at various places in mongler.
Row 2 - Column 3 - Chan version
The version of the chanfile.
Row 2 - Column 4 - Mongler version
What version of mongler the chanfile is intended for.
Row (line) 3
Row three is a blankline, thus it serves no purpose.
Row (line) 4
Row four is a table header, thus it serves no purpose.
Row (line) 5++
This is where all the board-specific information starts. From this row and on, each row will be information about a board on the chan.
Column 1 - Board name
The abbreviation of the board.
Examples: b, wg, r9k, ...
Column 2 - Board description
A fitting description of the board.
Examples: Random, Wallpapers, ROBOT 9000, ...
Column 3 - File/folder prefix
The prefix mongler will add on files/folders for this board.
Usually the same as column 1.
Column 4 - Board index
The complete URL to the board index.
Example: http://img.4chan.org/b/
Column 4 - Pre-boardpage
When viewing page n of a board, everything before the page number in page URL.
Example: http://img.4chan.org/b/ 4.html
Allows the use of !null~ if it's not necessary.
Column 5 - Post-boardpage
When viewing page n of a board, everything after the page number in page URL.
Example: http://img.4chan.org/b/4 .html
Allows the use of !null~ if it's not necessary.
Column 6 - Number of pages
How many pages there are on the board.
Column 7 - Thread URL prefix
In most cases, the thread link is not absolute (the start of the link is missing).
- Navigate to the board index page in a browser
- Open one of the threads in a separate tab, take note of the thread ID
- Right-click the board index page, select "view source code"
- Search for the thread ID in the source code (next to the word "reply")
- Compare the actual url of the thread with what you found in the source code
- Enter the missing part into column 7 of the chanfile
Example:
- Thread URL: http://img.4chan.org/b/res/86582475.html
- Source code: [<a href="res/86582475.html">Reply</a>]</span>
- What to add: http://img.4chan.org/b/
Allows the use of !null~ if it's not necessary.
Column 8 - Image URL prefix
Although rare, there are cases where image URLs are not absolute.
- Open up a thread or a board-page
- Open one of the images in a separate tab, take note of the numbers (image filename)
- Right-click the website where you found the image, select "view source code"
- Search for the image filename in the source code (next to href=)
- Compare the actual url of the image with what you found in the source code
- Enter the missing part into column 7 of the chanfile
Example:
- Image URL: http://img.4chan.org/b/src/1222023720322.jpg
- Source code: <a href="http://img.4chan.org/b/src/1222023005191.jpg" target=
- What to add: Since nothing is missing: !null~
Allows the use of !null~ if it's not necessary.
Column 9 - Pre-threads
In case it's difficult to find a good threadsplit value (see column 11), limiting what to search through can make it simpler. Everything before (and including) what you enter here will be ignored when looking for thread URLs.
Allows the use of !null~ if it's not necessary.
Column 10 - Post-threads
Same as column 9, except that this makes mongler ignore everything after (and including) what you enter here.
Allows the use of !null~ if it's not necessary.
Column 11 - Threadsplit
Chanmongler needs to know how many thread URLs there are on each board page, and approximately where to find them. In here, you enter a bit of text that appears once, and only once, between each thread URL in the board page source code.
Column 12 - Pre-threadlink
This is where we narrow down where the thread URL is. Chanmongler will discard anything before (and including) what you enter here, for each thread url, starting from where it found the threadsplit text.
Allows the use of !null~ if it's not necessary.
Column 13 - Post-threadlink
Same as column 12, except that this will discard everything after (and including) what you enter here. This text must not appear in the URL!
Allows the use of !null~ if it's not necessary.
Column 14 - Pre-images
Column 9, just for images instead.
Allows the use of !null~ if it's not necessary.
Column 15 - Post-images
Column 10, just for images instead.
Allows the use of !null~ if it's not necessary.
Column 16 - Imagesplit
Column 11, just for image-URLs instead.
Column 17 - Pre-image-URL
Column 12, just for image-URLs instead.
Allows the use of !null~ if it's not necessary.
Column 18 - Post-image-URL
Column 13, just for image-URLs instead.
Allows the use of !null~ if it's not necessary.
Column 19 - Pre-thread-ID
What appears before the thread-ID in thread URLs.
Example: http://img.4chan.org/b/res/ 86582475.html
Allows the use of !null~ if it's not necessary.
Column 19 - Pre-thread-ID
What appears after the thread-ID in thread URLs.
Example: http://img.4chan.org/b/res/86582475 .html
Allows the use of !null~ if it's not necessary.