Merge branch 'android' of git.nikiroo.be:git/fanfix into android
[fanfix.git] / README.md
CommitLineData
10ccd649 1English [Français](README-fr.md)
eab9e01c 2
08fe2e33 3# Fanfix
36142555 4Fanfix is a small Java program that can download stories from some supported websites and render them offline.
08fe2e33 5
2953f988
NR
6## Synopsis
7
8- ```fanfix``` --import [*URL*]
9- ```fanfix``` --export [*id*] [*output_type*] [*target*]
10- ```fanfix``` --convert [*URL*] [*output_type*] [*target*] (+info)
11- ```fanfix``` --read [*id*] ([*chapter number*])
12- ```fanfix``` --read-url [*URL*] ([*chapter number*])
13- ```fanfix``` --list
63b9c207 14- ```fanfix``` --set-reader [*GUI* | *TUI* | *CLI*]
2953f988
NR
15- ```fanfix``` --server [*key*] [*port*]
16- ```fanfix``` --stop-server [*key*] [*port*]
17- ```fanfix``` --remote [*key*] [*host*] [*port*]
18- ```fanfix``` --help
19
42375f55
NR
20## Description
21
eab9e01c
NR
22(If you are interested in the recent changes, please check the [Changelog](changelog.md) -- note that starting from version 1.4.0, the changelog is checked at startup.)
23
24(A [TODO list](TODO.md) is also available to know what is expected to come in the future.)
d649ced9 25
4a758059 26![Main GUI](screenshots/fanfix-1.3.2.png?raw=true "Main GUI")
b4dc6ab5 27
63b9c207
NR
28A screenshots cgallery an be found [here](screenshots/README.md).
29
373da363 30It will convert from a (supported) URL to an .epub file for stories or a .cbz file for comics (a few other output types are also available, like Plain Text, LaTeX, HTML...).
88c61aca 31
6ee59de8 32To help organize your stories, it can also work as a local library so you can:
42375f55 33
373da363
NR
34- Import a story from its URL (or just from a file)
35- Export a story to a file (in any of the supported output types)
333f0e7b 36- Display a story from the local library in text format in the console
3d709626 37- Display a story from the local library graphically **natively** or **by calling a native program to handle it** (potentially converted into HTML before hand, so any browser can open it)
88c61aca 38
2953f988 39### Supported websites
88c61aca
NR
40
41Currently, the following websites are supported:
42375f55 42
88c61aca
NR
43- http://FimFiction.net/: fan fictions devoted to the My Little Pony show
44- http://Fanfiction.net/: fan fictions of many, many different universes, from TV shows to novels to games
45- http://mangafox.me/: a well filled repository of mangas, or, as their website states: most popular manga scanlations read online for free at mangafox, as well as a close-knit community to chat and make friends
46- https://e621.net/: a Furry website supporting comics, including MLP
3968a05a 47- https://sofurry.com/: same thing, but story-oriented
6ee59de8 48- https://e-hentai.org/: done upon request (so, feel free to ask for more websites!)
31d53475 49- https://www.manga-lel.com/: a website offering a lot of mangas (in French)
88c61aca 50
2953f988 51### Support file types
88c61aca
NR
52
53We support a few file types for local story conversion (both as input and as output):
42375f55 54
88c61aca
NR
55- epub: .epub files created by this program (we do not support "all" .epub files, at least for now)
56- text: local stories encoded in plain text format, with a few specific rules:
42375f55
NR
57 - the title must be on the first line
58 - the author (preceded by nothing, ```by ``` or ```©```) must be on the second line, possibly with the publication date in parenthesis (i.e., ```By Unknown (3rd October 1998)```)
59 - chapters must be declared with ```Chapter x``` or ```Chapter x: NAME OF THE CHAPTER```, where ```x``` is the chapter number
60 - a description of the story must be given as chapter number 0
61 - a cover image may be present with the same filename as the story, but a .png, .jpeg or .jpg extension
88c61aca
NR
62- info_text: contains the same information as the text format, but with a companion .info file to store some metadata (the .info file is supposed to be created by Fanfix or compatible with it)
63- cbz: .cbz (collection of images) files, preferably created with Fanfix (but any .cbz file is supported, though without most of Fanfix metadata, obviously)
eab9e01c 64- html: HTML files that you can open with any browser; note that it will create a directory structure with ```index.html``` as the main file -- we only support importing HTML files created by Fanfix
08fe2e33 65
2953f988 66### Supported platforms
08fe2e33 67
301791d3 68Any platform with at lest Java 1.6 on it should be ok.
08fe2e33 69
eab9e01c 70It has been tested on Linux (Debian, Slackware, Ubuntu), MacOS X and Windows for now, but feel free to inform us if you try it on another system.
b4dc6ab5 71
eab9e01c 72If you have any problems to compile it with a supported Java version (1.6+), please contact us.
08fe2e33 73
2953f988 74## Options
08fe2e33 75
b4dc6ab5 76You can start the program in GUI mode (as in the screenshot on top):
42375f55 77
88c61aca 78- ```java -jar fanfix.jar```
2953f988 79- ```fanfix``` (if you used *make install*)
88c61aca 80
b4dc6ab5 81The following arguments are also allowed:
42375f55 82
88c61aca
NR
83- ```--import [URL]```: import the story at URL into the local library
84- ```--export [id] [output_type] [target]```: export the story denoted by ID to the target file
85- ```--convert [URL] [output_type] [target] (+info)```: convert the story at URL into target, and force-add the .info and cover if +info is passed
86- ```--read [id] ([chapter number])```: read the given story denoted by ID from the library
eab9e01c 87- ```--read-url [URL] ([chapter number])```: convert on the fly and read the story at URL, without saving it
88c61aca 88- ```--list```: list the stories present in the library and their associated IDs
b0e88ebd 89- ```--set-reader [reader type]```: set the reader type to CLI, TUI or GUI for this command
eab9e01c 90- ```--server [key] [port]```: start a story server on this port
42375f55 91- ```--stop-server [key] [port]```: stop the remote server running on this port (key must be set to the same value)
eab9e01c 92- ```--remote [key] [host] [port]```: contact this server instead of the usual library (key must be set to the same value)
88c61aca 93- ```--help```: display the available options
eab9e01c 94- ```--version```: return the version of the program
08fe2e33 95
2953f988 96### Environment
08fe2e33 97
88c61aca 98Some environment variables are recognized by the program:
42375f55 99
eab9e01c 100- ```LANG=en```: force the language to English
88c61aca
NR
101- ```CONFIG_DIR=$HOME/.fanfix```: use the given directory as a config directory (and copy the default configuration if needed)
102- ```NOUTF=1```: try to fallback to non-unicode values when possible (can have an impact on the resulting files, not only on user messages)
adc71d36 103- ```DEBUG=1```: force the ```DEBUG=true``` option of the configuration file (to show more information on errors)
08fe2e33
NR
104
105## Compilation
106
88c61aca 107```./configure.sh && make```
08fe2e33 108
36142555 109You can also import the java sources into, say, [Eclipse](https://eclipse.org/), and create a runnable JAR file from there.
08fe2e33 110
9f8f013a
NR
111There are some unit tests you can run, too:
112
113```./configure.sh && make build test run-test```
114
08fe2e33
NR
115### Dependant libraries (included)
116
2953f988
NR
117Required:
118
119- ```libs/nikiroo-utils-sources.jar```: some shared utility functions
120- [```libs/unbescape-sources.jar```](https://github.com/unbescape/unbescape): a nice library to escape/unescape a lot of text formats; used here for HTML
121- [```libs/jsoup-sources.jar```](https://jsoup.org/): a library to parse HTML
122
123Optional:
124
125- [```libs/jexer-sources.jar```](https://github.com/klamonte/jexer): a small library that offers TUI widgets
126- [```pandoc```](http://pandoc.org/): to generate the man pages from the README files
08fe2e33 127
301791d3 128Nothing else but Java 1.6+.
08fe2e33 129
88c61aca 130Note that calling ```make libs``` will export the libraries into the src/ directory.
08fe2e33 131
42375f55
NR
132## Author
133
134Fanfix was written by Niki Roo <niki@nikiroo.be>
135