Difference between revisions of "Cloc"

From COPTR
Jump to navigation Jump to search
(Created page with "<!-- Use the structure provided in this template, do not change it! --> {{Infobox_tool |purpose=A brief description |image={{PAGENAMEE}}.png |homepage=url |license= |platform...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- Use the structure provided in this template, do not change it! -->
+
{{Infobox tool
 +
|purpose=Cloc (Count Lines of Code) serves not only to count the lines of Code,but also guesses the programming language, thus can be used to identify files. It is a command line tool which is easy to use.
 +
|homepage=[https://github.com/AlDanial/cloc CLOC in GitHub]
 +
|license=GNU General Public License v2.0
 +
|function=File Format Identification
 +
}}
 +
{{Infobox tool details}}
 +
== Description ==
 +
<!-- Describe the what the tool does, focusing on it's digital preservation value. Keep it factual. -->
 +
Start the command line from the folder which contains the CLOC exe file.
  
{{Infobox_tool
+
Type:
|purpose=A brief description
+
 
|image={{PAGENAMEE}}.png
+
''cloc-1.78.exe D:/Folder/fileToAnalyse''
|homepage=url
 
|license=
 
|platforms=
 
}}
 
<!-- Note that to use the image field, you should leave the value as {{PAGENAMEE}}.png (or similar) and upload a copy of the image. Hot-linking is not supported. If you don't want an image, just remove that line. -->
 
  
<!-- Add one or more categories to describe the function of the tool, such as:
+
The findings are shown in the black window. Alternatively, you can have an output file
[[Category:Metadata Extraction]] or [[Category:Preservation System]] or [[Category:Backup]]
 
Choose carefully, and view the list of existing categories first (see the Navigation sidebar on the left) -->
 
  
 +
''cloc-1.78.exe D:/Folder/fileToAnalayse > outputfile.txt''
  
<!-- Add relevant categories to describe the content type that the tool addresses, such as:
+
You can also analyse all files in certain folder, the syntax is like this:
[[Category:Audio]] or [[Category:Document]] or [[Category:Research Data]]
 
Choose carefully, and view the list of existing categories first (see the Navigation sidebar on the left). If the tool works on any content type, do not add a category. -->
 
  
 +
''cloc-1.78.exe D:/AnalyseWholeFolder > outputForAllFilesInFolder.txt''
  
== Description ==
+
[[File:Cloc_FindingExxample.jpg]]
<!-- Describe the what the tool does, focusing on it's digital preservation value. Keep it factual. -->
 
  
 
== User Experiences ==
 
== User Experiences ==
Line 29: Line 30:
 
<!-- Provide *evidence* of development activity of the tool. For example, RSS feeds for code issues or commits. -->
 
<!-- Provide *evidence* of development activity of the tool. For example, RSS feeds for code issues or commits. -->
 
<!-- Add the OpenHub.com ID for the tool, if known. -->
 
<!-- Add the OpenHub.com ID for the tool, if known. -->
{{Infobox_tool_details
+
 
|releases_rss=
+
The tool is now released at GitHub. [https://github.com/AlDanial/cloc/releases CLOC Page on GitHub]
|issues_rss=
+
There are new releases roughly twice a year.
|mailing_lists=
 
|ohloh_id=
 
}}
 

Latest revision as of 16:40, 21 April 2021




Cloc (Count Lines of Code) serves not only to count the lines of Code,but also guesses the programming language, thus can be used to identify files. It is a command line tool which is easy to use.
Homepage: "[https" has not been listed as valid URI scheme.CLOC in GitHub
License:GNU General Public License v2.0
Function:File Format Identification




Description[edit]

Start the command line from the folder which contains the CLOC exe file.

Type:

cloc-1.78.exe D:/Folder/fileToAnalyse

The findings are shown in the black window. Alternatively, you can have an output file

cloc-1.78.exe D:/Folder/fileToAnalayse > outputfile.txt

You can also analyse all files in certain folder, the syntax is like this:

cloc-1.78.exe D:/AnalyseWholeFolder > outputForAllFilesInFolder.txt

Cloc FindingExxample.jpg

User Experiences[edit]

Development Activity[edit]

The tool is now released at GitHub. CLOC Page on GitHub There are new releases roughly twice a year.