<commit_before>module Projekt.Main
(*
projekt (init|reference|newfile|addfile/addfile) /path/to/project {--template=(library|console)} {--solution=path/to/sln} --direction=(down|up) --repeat={int} --frameworkversion=(4.0|4.5|4.5.1)

--solution - when specificed add remove 
--direction - for move operations
--frameworkversion
--n - repeat action n times - ony works for move operations
--compile=(true|false) - when adding file this flag allows you to exclude it from compilation

examples:
projekt init /path/to/new/fsproj --template=library //creates a new project but does not add it to a solution

projekt reference /path/to/target {thingtoreference} //references project or binary

projekt newfile /path/to/project {FileName} //add file to project - could template files?

projekt addfile /path/to/project /path/to/file //add file to project - could template files?

projekt movefile /path/to/project --direction=up --n=3 //add file to project - could template files?

 *)

open System

[<EntryPoint>]
let main argv =
    printfn "pre %A" argv
    let op = Args.parse argv

    match op with
    | Init data ->
        Template.init "templates" data
    | NewFile data ->
        let p = new FSharpProject(data.ProjPath)
        p.AddFile data.FilePath
        p.Flush()
    | Reference data ->
        let el = Project.addReference data.ProjPath data.Reference
        el.Save(data.ProjPath)
    | _ -> failwith "not implemented yet"
    printfn "operation: %A parseArgs" op
    0<commit_msg>smaller changes<commit_after>module Projekt.Main
let help = """
projekt (init|reference|newfile|addfile|renamefile) /path/to/project {--template=(library|console)} {--solution=path/to/sln} --direction=(down|up) --repeat={int} --frameworkversion=(4.0|4.5|4.5.1)

--solution - when specificed add remove 
--direction - for move operations
--frameworkversion
--n - repeat action n times - ony works for move operations
--compile=(true|false) - when adding file this flag allows you to exclude it from compilation

examples:

projekt init /path/to/new/fsproj --template=library //creates a new project but does not add it to a solution

projekt reference /path/to/target {thingtoreference} //references project or binary

projekt newfile /path/to/project {FileName} //add file to project - could template files?

projekt addfile /path/to/project /path/to/file //add file to project - could template files?

projekt movefile /path/to/project --direction=up --n=3 //add file to project - could template files?

"""

open System

[<EntryPoint>]
let main argv =
    printfn "pre %A" argv
    let op = Args.parse argv

    match op with
    | Init data ->
        Template.init "templates" data
    | NewFile data ->
        let p = new FSharpProject(data.ProjPath)
        p.AddFile data.FilePath
        p.Flush()
    | Reference data ->
        let el = Project.addReference data.ProjPath data.Reference
        el.Save(data.ProjPath)
    | _ -> failwith "not implemented yet"

    0
{'fraction_non_alphanumeric': 0.11391129032258064, 'fraction_numerical': 0.006048387096774193, 'mean_word_length': 3.181179775280899, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3471261', 'n_tokens_mistral': 899, 'n_tokens_neox': 901, 'n_words': 299}