mirror of
https://git.tesses.org/tesses50/tessesframework.git
synced 2026-06-01 18:15:31 +00:00
Overhaul cmake configuration, add console api, fix http code that caused issues with cgi-bin
This commit is contained in:
@@ -6,18 +6,15 @@ using namespace Tesses::Framework::Filesystem;
|
||||
using namespace Tesses::Framework::Serialization::Bencode;
|
||||
using namespace Tesses::Framework::TextStreams;
|
||||
using namespace Tesses::Framework::BitTorrent;
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int main(int argc, char **argv) {
|
||||
TF_Init();
|
||||
if(argc < 2)
|
||||
{
|
||||
printf("USAGE: %s /path/to/torrent/file\n",argv[0]);
|
||||
if (argc < 2) {
|
||||
printf("USAGE: %s /path/to/torrent/file\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
auto strm = LocalFS->OpenFile((std::string)argv[1],"rb");
|
||||
auto strm = LocalFS->OpenFile((std::string)argv[1], "rb");
|
||||
auto bencode = Bencode::Load(strm);
|
||||
if(std::holds_alternative<BeDictionary>(bencode))
|
||||
{
|
||||
if (std::holds_alternative<BeDictionary>(bencode)) {
|
||||
|
||||
TorrentFile file(std::get<BeDictionary>(bencode));
|
||||
file.Print(std::make_shared<ConsoleWriter>());
|
||||
|
||||
Reference in New Issue
Block a user