Node application allowing to scrap torrent informations on "cpasbien" web site. This node application expose a REST API and a command line interface to manage torrents. The application allows to send torrents to your Synlogy download station with Synology REST API.
An IOS client is provided to exploit Node REST API. This client use new Apple programming language (Swift)
- NodeJs v0.10.36
Install dependances provided in package.json
Go to node
folder
npm install
- Go to folder:
cpasbien/node/configuration/
- Clone file
config-orig.json
toconfig.json
- Customize values
- serverPort: node Rest Api server port
- userAgent: user agent that will be uses during scraping process
- synoHost: IP adress of your synology NAS
- synoPort: Port of your synology admin interface, by default 5000
- synoAccount: Account user of your diskstation. I recommand to use your usual account name because downloads won't be visible to every users if you don't have true rights.
- synoPasswd: Password of your syno account
- synoDownloadDestinationFolder: Torrents will be download to your destination folder. You should use the same folder than DownloadSation to avoid permissions errors.
{
"serverPort": 8080,
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36",
"synoHost": "192.168.1.20",
"synoPort": 5000,
"synoAccount": "download",
"synoPasswd": "download",
"synoDownloadDestinationFolder": "downloads"
}
All API web methods are available through command line interface
Usage: cpasbien [options]
Options:
-h, --help output usage information
-V, --version output the version number
--list list research
--id [value] display search <id>
--remove [value] remove search <id>
--create [value] new search <title>
--update [value] update search <id>
--disable [value] disable torrent <id,order?>
--enable [value] enable torrent <id,order?>
--download [value] downloads missing torrents <id>
--compactdb compact database
- xcode 6.2
- CocoaPods 0.36.0
Install dependances provided in Podfile
Go to ios
folder
pod install
- Go to folder:
cpasbien/ios/
- Open workspace file:
cpasbien.xcworkspace
- Customize file:
Configuration.swift
according to your node config (server IP and port)
class Configuration {
struct Consts {
#if LOCAL
static let serverUrl = "http://127.0.0.1:8080/api/1/"
#else
static let serverUrl = "http://192.168.1.20:8080/api/1/"
#endif
}
}
Switch from LOCAL to RELEASE build by customizing your Scheme (Debug -> DebugLocal)