<commit_before>JottaCloud File System (JFS) client in nodejs 
==============
This will eventually be a client for backup up local files to JottaCloud a fast, reliable and cheap cloud storage solution based in Norway. It's written in NodeJS and should work on most all OS and even devices like NAS. As Jotta hsa not released any official API or documentation this client is entierly created by examining the requests the official client does then figuring out how to recreate them.      

Install
--------------
Install nodejs and npm (node package manager).
Download the code, easiest is to use git and simply clone this repository.

    git clone https://github.com/paaland/node-jfs 

Then download the required dependencies:

    npm install 

Configure
--------------
Create the file config.json and insert your username and password:

    {
        "username": "yourusername",
        "password": "<PASSWORD>" 
    }

Syntax
-------------
**Listing content**

    node jsf.js --ls [Device/MountPoint/Folder]

    --ls                            list all devices (if you have more than one)
    --ls device                     list all mount points on device
    --ls device/mountpoint          list all folders and files in mount point
    --ls device/mountpoint/folder   list all folders and files in folder

**Downloading a file**

    node jsf.js --get Device/MountPoint/Folder/File

**Upload a single file**

    node jsf.js --put Device/MountPoint/Folder --file LocalFile.ext

Note that for now the device (first part of path) must already exist.

**Upload a folder**

    node jsf.js --put Device/MountPoint/Folder --folder LocalPath --ignore .tmp --ignore temp 

This will scan all files (and folders) in LocalPath and upload any new or changed files. Ignoring any files containing ignore strings in name.

Devices and mount points
=============
The first part of the path is called a device. Weather you can have multiple devies depends on your account type. Unlimited accounts can have unlimieted devices.
The device "Jotta" is reserved for the Jotta functionality. Under Jotta you will find "Sync", "Backup" and "Archive" which are reserved mount points.

    Jotta/Sync    -> This is where your sync folder resides
    Jotta/Backup  -> This is the mount point for backup of devices
    Jotta/Archive -> This is the mount point for archived files

Limitations
==============
* Note that JottaCloud is officially only for Windows. This means that file names and paths are not case sensitive. 
So README and readme will be the same file.
* To download files or list files in folders that has a space either encapsulete in quotes or use a + character 
("device/Home Videos" or device/Home+Videos)
* When uploading folders the client will calculate the MD5 hash for the file and query JottaCloud before uploading the file. Only new or changed files are uploaded.
<commit_msg>Modified readme.md<commit_after>JottaCloud File System (JFS) client in nodejs 
==============
This will eventually be a client for backup up local files to JottaCloud a fast, reliable and cheap cloud storage solution based in Norway. It's written in NodeJS and should work on most all OS and even devices like NAS. As Jotta hsa not released any official API or documentation this client is entierly created by examining the requests the official client does then figuring out how to recreate them.      

Requirements
--------------
    NodeJS (required), https://nodejs.org
    git (optional, but recomended), https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
    
Install
--------------
Install nodejs and npm (node package manager).
Download the code, easiest is to use git and simply clone this repository.

    git clone https://github.com/paaland/node-jfs 

Then download the required dependencies:

    npm install 

Update
-------------
To update if you used git simply do a git pull from within the node-jfs folder you previously cloned.

    git pull

Configure
--------------
Create the file config.json and insert your username and password:

    {
        "username": "yourusername",
        "password": "<PASSWORD>" 
    }

Syntax
-------------
**Listing content**

    node jsf.js --ls [Device/MountPoint/Folder]

    --ls                            list all devices (if you have more than one)
    --ls device                     list all mount points on device
    --ls device/mountpoint          list all folders and files in mount point
    --ls device/mountpoint/folder   list all folders and files in folder

**Downloading a file**

    node jsf.js --get Device/MountPoint/Folder/File

**Upload a single file**

    node jsf.js --put Device/MountPoint/Folder --file LocalFile.ext

Note that for now the device (first part of path) must already exist.

**Upload a folder**

    node jsf.js --put Device/MountPoint/Folder --folder LocalPath --ignore .tmp --ignore temp 

This will scan all files (and folders) in LocalPath and upload any new or changed files. Ignoring any files containing ignore strings in name.

Devices and mount points
=============
The first part of the path is called a device. Weather you can have multiple devies depends on your account type. Unlimited accounts can have unlimieted devices.
The device "Jotta" is reserved for the Jotta functionality. Under Jotta you will find "Sync", "Backup" and "Archive" which are reserved mount points.

    Jotta/Sync    -> This is where your sync folder resides
    Jotta/Backup  -> This is the mount point for backup of devices
    Jotta/Archive -> This is the mount point for archived files

Limitations
==============
* Note that JottaCloud is officially only for Windows. This means that file names and paths are not case sensitive. 
So README and readme will be the same file.
* To download files or list files in folders that has a space either encapsulete in quotes or use a + character 
("device/Home Videos" or device/Home+Videos)
* When uploading folders the client will calculate the MD5 hash for the file and query JottaCloud before uploading the file. Only new or changed files are uploaded.

{'fraction_non_alphanumeric': 0.08429181728557344, 'fraction_numerical': 0.0004929346040092015, 'mean_word_length': 3.079758713136729, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3562171', 'n_tokens_mistral': 1562, 'n_tokens_neox': 1480, 'n_words': 822}