Displaying 18 results from an estimated 18 matches for "full_filename".
2023 Dec 30
2
Help request: Parsing docx files for key words and appending to a spreadsheet
...: argument "x" is missing, with no default
The whole code so far looks like this:
# Load libraries
library(tcltk)
library(tidyverse)
library(officer)
filepath <- setwd(tk_choose.dir())
filename <- "Now they want us to charge our electric cars from litter
bins.docx"
#full_filename <- paste0(filepath, filename) # Calum's original suggestion
full_filename <- paste(filepath, filename, sep="/") # Eric's proposed fix
#lets double check the file does exist! # The rest here is Calum's
suggestion
if (!file.exists(full_filename)) {
? message("File...
2023 Dec 30
3
Help request: Parsing docx files for key words and appending to a spreadsheet
An update: Running this block of code:
# Load libraries
library(tcltk)
library(tidyverse)
library(officer)
filepath <- setwd(tk_choose.dir())
filename <- "Now they want us to charge our electric cars from litter
bins.docx"
#full_filename <- paste0(filepath, filename)
full_filename <- paste(filepath, filename, sep="/")
if (!file.exists(full_filename)) {
? message("File missing")
} else {
? content <- read_docx(full_filename) |>
??? docx_summary()
? # this reads docx for the full filename and
? #...
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
full_filename <- paste(filepath, filename,sep="/")
On Sat, Dec 30, 2023 at 1:45?PM Andy <phaedrusv at gmail.com> wrote:
> Thanks Ivan and Calum
>
> I continue to appreciate your support.
>
> Calum, I entered the code snippet you provided, and it returns 'file
> missing&...
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
Thanks Ivan and Calum
I continue to appreciate your support.
Calum, I entered the code snippet you provided, and it returns 'file
missing'. Looking at this, while the object 'full_filename' exists, what
is happening is that the path from getwd() is being appended to the
title of the article, but without the '/' between the end of the path
name (here 'TEST' and the name of the article. In other words,
full_filename is reading "~/TESTNow they want us to cha...
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...ilepath <- getwd() #you will want to change this later. You are doing
something with tcl to pick a directory which seems rather fancy! But keep
doing it for now or set the directory here ending in a /
filename <- "Now they want us to charge our electric cars from litter
bins.docx"
full_filename <- paste0(filepath, filename)
#lets double check the file does exist!
if (!file.exists(full_filename)) {
message("File missing")
} else {
content <- read_docx(full_filename) |>
docx_summary()
# this reads docx for the full filename and
# passes it ( |> command...
2007 Jun 29
1
attachment_fu validation error
...niMagick''
validates_as_attachment
end
OK, logos are working great in the application, resizing, storage,
retrieval, ..., fine. But the validation of existing logos fails with
(complete trace below)
Logo.find(:first).valid?
NameError: undefined local variable or method `full_filename'' for
#<Logo:0x3561ed8>
And unfortunately that is triggered by something''s
validates_associated if no logo is uploaded in its edition. I don''t
see why valid? ends up calling set_size_from_temp_path, sizes were
correctly computed and stored on creation:
p...
2007 Aug 27
2
send_file : downloaded file cannot be open after upload OK
...ad , using the ''attachment_fu'' plugin...
I can see and open the uploaded files (a pdf file 60k and a jpeg images
28k)
now I try to implement the download action in my document_controller, I
wrote :
def download
@document = Document.find(params[:id])
send_file(@document.full_filename,
:filename => URI.encode(@document.filename),
:type => @document.content_type,
:encoding => ''utf8'',
:disposition => ''attachment'',
:stream => ''true'',
:buffer_size => ''...
2007 Jun 27
5
How to make attachment_fu generate RESTFUL URL
hi folks:
I follow this article:http://clarkware.com/cgi/blosxom/2007/02/24
all goes well except the public_filename ,it return something like
"photos/0000/0001/test.jpg" ,not the expected RESTFUL URL LIKE
''photos/1/test.jpg'',any suggestion?
My Env is Rails 1.2.3 on Ruby 1.8.6 with attachment_fu from http
://svn.techno-weenie.net/projects/plugins/attachment_fu/ by now
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
? Fri, 29 Dec 2023 20:17:41 +0000
Andy <phaedrusv at gmail.com> ?????:
> doc_in <- read_docx(files)
>
> Results in this error:Error in filetype %in% c("docx") &&
> grepl("^([fh]ttp)", file) :'length = 9' in coercion to 'logical(1)'
help(read_docx) says that the function only imports one docx file. In
order to read multiple files,
2010 Jul 11
0
Attachement_fu error when updating existing photos
...am coming up with the
following exception:
can''t convert nil into String
/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:23:in
`join''
/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:23:in
`full_filename''
/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:369:in
`temp_paths''
/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:354:in
`uploaded_data=''
My ruby code:
<% form_for(@photo) do |f| %>
<%= f.error_messages %>
<%= image...
2007 Dec 13
4
Attachment_fu problems on updates
...ts/Projects/Rails/CommunityCMS/trunk
Application Trace | Framework Trace | Full Trace
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in
`join''
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in
`full_filename''
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:281:in
`temp_paths''
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:275:in
`temp_path''
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:241:in
`save_attachment?''
vendor/p...
2007 Mar 04
3
Dynamically setting the image directory used by attachment_fu
...mages to be grouped by the item
object which has_many item_images. You can do that by adding the
following two methods to the item_image object.
# Make sure the related item is associated to the thumbnail child
before_thumbnail_saved do |record, thumbnail|
thumbnail.item = record.item
end
def full_filename(thumbnail = nil)
# Just to be sure the ID gets set
raise "Missing Item ID" if item_id.nil?
file_system_path = (thumbnail ? thumbnail_class :
self).attachment_options[:path_prefix].to_s
File.join(RAILS_ROOT, file_system_path, item_id.to_s,
attachment_path_id, thumbnail_name...
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested.
But, I added some code to that model that I do need to test. Basically,
I need to somehow fulfill the "uploaded_data" property so I can actually
run my tests(otherwise they fail because of validations). The
"uploaded_data" field is what would grab the multipart data from form.
Here
2006 Oct 15
1
mongrel_send_file gem plugin
...Time.now.to_s.split(''//'').sort_by { rand }.join )
# initialize session. Use the :session_files_key option here
session[:files] ||= {}
# set the value for this file with a 5 minute expiration time
session[:files][filehash] = [5.minutes.from_now.to_i,
@attachment.full_filename, @attachment.content_type]
# redirect to the path served by mongrel_send_file
redirect_to "/file/#{filehash}/#{@attachment.filename}"
end
# startup mongrel with this command
mongrel_rails -S config/mongrel_send_file.conf
== Note
I wrote this for a couple Rails apps that use...
2007 Apr 08
1
acts_as_attachment save file in folder named after models parent id
This is probably pretty easy, but I''m still a newb as far as ruby and
rails goes.
I am using the acts_as_attachment and would like to know how I go
about setting the path that the file is saved to so that it is saved
in a folder named after the models parent model id
Thanks in advance
Tony
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2007 Aug 27
1
Send_file() method for downloading any file
HI,
I need to know how to download any file using send_file() method.The
code I have shown below is for a specific file........how ever I need it
for any file.
THE CODE
........
def download_files
send_file(''D:/hr/Handbook.doc'',
:filename => params[:filename] ,
:type => ''application/octet-stream'',
2007 Sep 18
2
Making attachment_fu polymorphic
...work for macs. If this is giving you trouble on a PC, try
reversing the direction of the ''/''s
# this over writes the public_filename method in attachment_fu.
# NOTA BENE: this over writes attachment_fu''s public_filename, if
you over write attachment_fu''s
# full_filename, you may also have to over write Attachment_kung''s
public_filename.
def public_filename(thumbnail = nil)
if path_prefix != ""
path_prefix.gsub!(''public'','''') if path_prefix.include?
(''public'')
path_prefix +...
2009 Feb 17
1
cloning an already uploaded image using attachment_fu
Hi,
I have an Image model that is attached to a item. The image was uploaded
through attachment_fu. Now, I want to reuse the same image for a new
item. I tried several tips found online. For example in
http://danieloshea.com/articles/254-cloning-images
# Create a clone of an image and it''s thumbnails.
def create_clone
c = self.clone
self.thumbnails.each do