Skip to content

Commit

Permalink
Add support for some MS project files to autodescribe
Browse files Browse the repository at this point in the history
There's often not much of a description in these.
  • Loading branch information
dfandrich committed Jul 28, 2023
1 parent 9d8cecf commit cf732b4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions autodescribe
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,19 @@ comment_vbox () {
COMMENT=$(xmlstarlet sel -N vb=http://www.virtualbox.org/ -t -v '/vb:VirtualBox/vb:Machine/@name' -o ' (' -t -v '/vb:VirtualBox/vb:Machine/@OSType' -o ')' < "$1")
}

# File type: vbproj (Microsoft Visual Basic project file)
# This also works for related MS project files
# requires: xmlstarlet
comment_vbproj () {
COMMENT=$(xmlstarlet sel -t -v "/*[local-name()='Project']/*[local-name()='PropertyGroup']/*[local-name()='Description']" -nl -v "/*[local-name()='Project']/*[local-name()='PropertyGroup']/*[local-name()='RootNamespace']" -nl < "$1" | sed '/^$/d' | head -1)
}

# File type: vcproj (Microsoft Visual Studio project file)
# requires: xmlstarlet
comment_vcproj () {
COMMENT=$(xmlstarlet sel -t -v "/VisualStudioProject/@Name" < "$1")
}

# File type: wml (Wireless Markup Language)
# requires: xmlstarlet
comment_wml () {
Expand Down Expand Up @@ -1481,6 +1494,12 @@ for f in "$@" ; do
*.vbox)
TYPE=vbox
;;
*.vbproj | *.csproj | *.vcxproj)
TYPE=vbproj
;;
*.vcproj)
TYPE=vcproj
;;
*.wacz)
TYPE=wacz
;;
Expand Down

0 comments on commit cf732b4

Please sign in to comment.