arnaucode 9ecec88e7d | 6 years ago | |
---|---|---|
apiServer | 6 years ago | |
build | 6 years ago | |
cli | 6 years ago | |
listPadsImporter | 6 years ago | |
webServer | 6 years ago | |
.gitignore | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
build.sh | 6 years ago | |
error.go | 6 years ago | |
etherpad.go | 6 years ago | |
file.go | 6 years ago | |
git.go | 6 years ago | |
ipfs.go | 6 years ago | |
padArchiver-cli.png | 6 years ago | |
padArchiver-webServer.gif | 6 years ago | |
padArchiver.go | 6 years ago | |
padArchiver_test.go | 6 years ago |
Tool to store pads (from url) into local directory and IPFS.
The tool is composed by different tools around the library:
All the necessary files are in the /build directory. Can be build using the 'bash build.sh' script.
This is a webserver that automatically generates a web from the pads directories and files stored. To run, inside 'build' directory:
./webServer
The html template can be easily changed.
This is to import all pads from the json file 'list.json'. Just need to edit the json file, for example:
{
"repoid": "repo01",
"pads": [
{
"link": "http://board.net/p/pad1",
"dir": "Group1",
"title": "Pad1"
},
{
"link": "http://board.net/p/pad2",
"dir": "Group1",
"title": "Pad2"
},
{
"link": "http://board.net/p/pad3",
"dir": "Group2",
"title": "Pad3"
}
]
}
To run, inside 'build' directory:
./importFromList
This is an API to run in localhost.
To run using the compiled binary:
> ipfs daemon
{
"port": "3080"
}
> ./padArchiver-APIserver
this returns:
[
'repo01',
'repo02'
]
this returns:
[
'repo01',
'repo01/Group1',
'repo01/Group1/Pad1.md',
'repo01/Group2',
'repo01/Group2/Pad2.md',
'repo01/Group2/Pad3.md',
'repo02/GroupA/Pad1.md'
]
data to send:
json: {
"link": "http://board.net/p/pad1",
"dir": "Group1",
"title": "Pad1"
}
this returns:
{
"link": "http://board.net/p/pad1",
"dir": "Group1",
"title": "Pad1",
"ipfsHash": "QmVyp4JSREK5syLmNRCafkZkhzC7CfvS9qYWKfvfffqK2B"
}
The IPFS hash is also added to the first line of the document, before adding the document to Git.
To run the CLI, just need to run inside the directory 'build':
./padArchiver-cli
And follow the instructions.